import { post, postcontent, get } from "../api";
//查询公司列表

//二道门所有企业信息
export const selectCompanyInfo = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/twodoorsenterprise', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})

//二道门数据折线图
export const selectCompanyDetail = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/twodoors', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})

//DCS单位告警数据（列表）
export const selectAlarmlistTable = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/alarmlistbyweek', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})

//DCS单位告警数据(折线图)
export const selectAlarmlistChart = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/alarmbyweek', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})

//园区告警数据统计（右）
export const selectWarningRight = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/alarmbytype', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})

//园区告警数据统计（左）
export const selectWarningLeft = (params) => new Promise((resolve, reject) => {
    post('/mpsh/client/screen/enterprisealarm', params).then(res => {
        resolve(res.data)
    }).catch(err => {
        reject(err.data)
    })
})